Load and aggregate RHEAS simulated Leaf Area Index (LAI), Water stress and Grain Weight Average Dry (GWAD) across different ensembles. Extract year from dates (we will use harvest year).
Aggregate RHEAS production forecasts and metrics with respect to Districts maize growing calendar.
We assume three maize growing seasons in Tanzania:
So we will aggregate the metrics and yield forecast per district with
this condition using the function RH_metrics.
Convert RHEAS yields from kg/ha to MT/ha.
Add shapefile for visualization.
## Warning: multiple methods tables found for 'approxNA'
Check and format Region names to be consistent in both the RHEAS and administrative boundaries. Here we check which regions are mission from RHEAS predictions.
## [1] "MAFIA"
Merge RHEAS and Admin data.
Visualize RHEAS predicted yields spatially for all seasons.
## Warning: multiple methods tables found for 'crop'
## Warning: multiple methods tables found for 'extend'
Visualize maize yield trends for the last 15 years.
## Warning: package 'ggplot2' was built under R version 4.1.3
Visualize yields per region between 2000-2022.
par(mai=c(1,2,1,1))
boxplot(lr$gwad ~ lr$Region, las=1, cex.axis=.75, horizontal=TRUE, xlab="Yield (MT/ha)", ylab="", cex=.5, col=rainbow(length(unique(lr$Region))))